package main

import "fmt"

type Pers struct {
	Name string
	Age  int
}

type stud struct {
	Pers
	Score int
}

func (p *Pers) PSay() {
	fmt.Println(*p)
}

func main() {
	//创建stu对象
	stu := stud{
		Pers:  Pers{Name: "张三", Age: 123},
		Score: 12,
	}
	//子类对象（继承）调用父类的方法
	stu.PSay()
}
